var util = require('../../utils/util.js');
var api = require('../../config/api.js');
var wxParse = require('../../lib/wxParse/wxParse.js');
var app = getApp();

Page({
  data: {
    sceneList: [],
    banner: [],
    city:"北京"
  },
  getData: function () {
    let that = this;
    util.request(api.SceneIndex).then(function (res) {
      if (res.code === '200') {
        that.setData({
          sceneList: res.datas.sceneList,
          banner: res.datas.banner,
        });
       wxParse.wxParse('article', 'html', article, that, 5);
      }
    });
  },

  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
   this.getData();
  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    
  },
  onHide: function () {
    // 页面隐藏

  },
  onUnload: function () {
    // 页面关闭

  },
  search:function(){
    wx.navigateTo({
      url: '/pages/hotelList/index'
    })
  },
  selectCity:function(){
    wx.navigateTo({
      url: '/pages/city/index'
    })
  }
  
})